

var Api = require('../../utils/api.js');
var wxRequest = require('../../utils/wxRequest.js')
const Adapter = require('../../utils/adapter.js')
var webSiteName= config.getWebsiteName;
var domain =config.getDomain

import config from '../../utils/config.js'

Page({
  data: {
    title: '产品列表',
    postsList: {},  
    page: 1,
    search: '', 
    showerror:"none", 
    showallDisplay: "block",
    displaySwiper: "block",
    floatDisplay: "none", 
    list: []
  },
  onLoad: function (options) {
    var self = this;
    var product = wxRequest.getRequest(Api.getProductList(options.id));
    product.then(res => {
      self.setData({
        list:res.data, 
      }); 
    });
  },
  click_detail:function(options){
      
      let img_path = options.currentTarget.dataset.status;
      wx.navigateTo({
        url: './detail?path='+ img_path,
      })
  },
})



